<html><head><title>SortArray</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">SortArray()</font></b></p>
<p><b>Syntax</b></p><blockquote>
<font color="#006666"><b>SortArray</b></font>(ArrayName(), Options [, Start, End])</blockquote>

<b>Description</b><br><blockquote>


Sorts the specified <a href="../reference/dim.html">array</a>, according to the given options. The array may be of one of 
<a href="../reference/variables.html">basic type</a>: byte, word, long, integer, string or float. For structured 
array, use <a href="sortstructuredarray.html">SortStructuredArray()</a>. Multi-dimensioned arrays are not supported. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>ArrayName()</i></td>
<td width="90%"> 
The array to sort. 

</td></tr>
<tr><td><i>Options</i></td>
<td> 
It can be a combination of the following values: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Sort_Ascending</font> : Sort the array in ascending order (lower values first)
  <font color="#924B72">#PB_Sort_Descending</font>: Sort the array in descending order (higher values first)
  <font color="#924B72">#PB_Sort_NoCase</font>    : Sort the string array without case sensitive (a=A, b=B etc..)
</font></pre>

</td></tr>
<tr><td><i>Start, End (optional)</i></td>
<td> 
The index of the first and last element in the array that should be sorted. If these parameters 
are not specified, then the whole array is sorted. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>
None.


</blockquote><p><b>Remarks</b></p><blockquote>

If an array is not fully filled then null elements will be sorted first in ascending order and 
last in descending order. 

</blockquote><p><b>See Also</b></p><blockquote>

<a href="sortstructuredarray.html">SortStructuredArray()</a>, <a href="randomizearray.html">RandomizeArray()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=randomizelist.html>RandomizeList()</a> - <a href=index.html>Sort Index</a> - <a href=sortlist.html>SortList()</a> ->

</body></html>